pad-end
ES7 spec-compliant String.prototype.padEnd shim.
Install
$ npm install --save pad-end
Usage
For more use-cases see the tests
var padEnd = require('pad-end');
padEnd('x', 4, 'ab');
padEnd('x', 4);
padEnd('abcd', 2, '#');
padEnd('abcd', 6, '123456');
Related
- pad-start - ES spec-compliant String.prototype.padStart shim.
- start-with - Determines whether a string begins with the characters of another string.
- end-with - Determines whether a string ends with the characters of another string.
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.